//package com.yc.cloud.admin.controller;
//
//import com.yc.cloud.common.basic.api.ResponseResult;
//import com.yc.cloud.common.orm.CommonPage;
//import com.yc.cloud.common.basic.dto.BasePageReqDTO;
//import com.yc.cloud.admin.dto.request.HwCameraStorageRelationCreateReqDTO;
//import com.yc.cloud.admin.dto.request.HwCameraStorageRelationUpdateReqDTO;
//import com.yc.cloud.admin.service.HwCameraStorageRelationService;
//import com.yc.cloud.admin.vo.HwCameraStorageRelationVo;
//
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.RequiredArgsConstructor;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//import jakarta.annotation.Resource;
//
///**
// * <p>
// * 摄像头存储策略关联表 前端控制器
// * </p>
// *
// * @author kinggu
// * @since 2025-09-15
// */
//@RestController
//@Api(tags = "摄像头存储策略关联表")
//@RequestMapping("/hw-camera-storage-relations")
//public class HwCameraStorageRelationController {
//
//    @Resource
//    private HwCameraStorageRelationService hwCameraStorageRelationService;
//
//    @ApiOperation("创建摄像头存储策略关联表")
//    @PostMapping
//    public ResponseResult<HwCameraStorageRelationVo> create(@Validated @RequestBody HwCameraStorageRelationCreateReqDTO createReqDTO) {
//        HwCameraStorageRelationVo newVo = hwCameraStorageRelationService.create(createReqDTO);
//        if (newVo != null) {
//            return ResponseResult.success(newVo);
//        }
//        return ResponseResult.failed("创建失败");
//    }
//
//    @ApiOperation("更新摄像头存储策略关联表")
//    @PutMapping("/{id}")
//    public ResponseResult<HwCameraStorageRelationVo> update(@PathVariable("id") Long id, @Validated @RequestBody HwCameraStorageRelationUpdateReqDTO updateReqDTO) {
//        updateReqDTO.setId(id);
//        HwCameraStorageRelationVo updatedVo = hwCameraStorageRelationService.update(updateReqDTO);
//        if (updatedVo != null) {
//            return ResponseResult.success(updatedVo);
//        }
//        return ResponseResult.failed("更新失败");
//    }
//
//    @ApiOperation("删除摄像头存储策略关联表")
//    @DeleteMapping("/{id}")
//    public ResponseResult<Boolean> delete(@PathVariable("id") Long id) {
//        boolean success = hwCameraStorageRelationService.delete(id);
//        if (success) {
//            return ResponseResult.success(true);
//        }
//        return ResponseResult.failed("删除失败");
//    }
//
//    @ApiOperation("获取摄像头存储策略关联表详情")
//    @GetMapping("/{id}")
//    public ResponseResult<HwCameraStorageRelationVo> getById(@PathVariable("id") Long id) {
//        return ResponseResult.success(hwCameraStorageRelationService.getVOById(id));
//    }
//
//    @ApiOperation("分页查询摄像头存储策略关联表")
//    @GetMapping
//    public ResponseResult<CommonPage<HwCameraStorageRelationVo>> list(@Validated BasePageReqDTO pageReqDTO) {
//        return ResponseResult.success(hwCameraStorageRelationService.list(pageReqDTO));
//    }
//}
//